home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / TCP_IP / TNOS230S / FTPCLI.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-22  |  1.9 KB  |  66 lines

  1. /* Mods by G1EMM and PA0GRI */
  2. #ifndef _FTPCLI_H
  3. #define _FTPCLI_H
  4.  
  5. #ifndef _STDIO_H_
  6. #define _STDIO_H_    1
  7. #include <stdio.h>
  8. #endif
  9.  
  10. #ifndef _FTP_H
  11. #include "ftp.h"
  12. #endif
  13.  
  14. #ifndef _SESSION_H
  15. #include "session.h"
  16. #endif
  17.  
  18. #ifndef _DIRUTIL_H
  19. #include "dirutil.h"
  20. #endif
  21.  
  22. #undef LINELEN
  23. #define LINELEN 256             /* Length of user command buffer */
  24.  
  25. #ifndef CTLZ
  26. #define CTLZ    26              /* EOF for CP/M systems */
  27. #endif
  28.  
  29. /* Per-session FTP client control block */
  30. struct ftpcli {
  31.     int control;            /* Control socket */
  32.     int data;               /* Data socket */
  33.  
  34.     char state;
  35. #define COMMAND_STATE   0       /* Awaiting user command */
  36. #define SENDING_STATE   1       /* Sending data to user */
  37. #define RECEIVING_STATE 2       /* Storing data from user */
  38. #define EXITING_STATE 3       /* Connection closed down */
  39.  
  40.     int16 verbose;          /* Transfer verbosity level */
  41. #define V_QUIET         0       /* Error messages only */
  42. #define V_SHORT         1       /* Final message only */
  43. #define V_NORMAL        2       /* display control messages */
  44. #define V_HASH          3       /* control messages, hash marks */
  45. #define V_BYTE          4       /* control messages, byte count */
  46.  
  47.     int batch;              /* Command batching flag */
  48.     int abort;              /* Aborted transfer flag */
  49.     int update;        /* Compare with MD5 during mput/mget */
  50.     char type;              /* Transfer type */
  51.     char typesent;          /* Last type command sent to server */
  52.     int logbsize;           /* Logical byte size for logical type */
  53.     FILE *fp;               /* File descriptor being transferred */
  54.     char line[LINELEN];    /* Last response from server */
  55.  
  56.     int lzw;        /* is lzw being used ? */
  57.     int lzwbits;        /* number of LZW bits selected */
  58.     int lzwmode;        /* lzw mode to use */
  59.     struct session *session;
  60.     char *password;
  61.     struct cur_dirs *curdirs;
  62. };
  63. #define NULLFTP (struct ftpcli *)0
  64.  
  65. #endif  /* _FTPCLI_H */
  66.